
import 'package:flutter/material.dart';
import 'package:get/get_rx/src/rx_typedefs/rx_typedefs.dart';
import 'package:valovault_reminder/common/ui/val_auto_fit_screen_size.dart';

import '../../../common/config/val_assets_name.dart';
import '../../../common/ui/val_ui_kit_btn.dart';
import '../../../common/ui/val_ui_kit_base_colors.dart';
import '../../../common/ui/val_ui_kit_dialog_impl.dart';
import '../../../common/ui/val_common_text.dart';

class ValNoticeMoreMenu extends StatelessWidget {

  final Callback onSure;

  const ValNoticeMoreMenu(this.onSure,{super.key});

  @override
  Widget build(BuildContext context) {
    return Padding(
        padding: EdgeInsets.only(left: 30.w, right: 30.w, top: 60.w),
        child: Column(
          children: [
            Container(
              alignment: Alignment.topCenter,
              height: 341.w,
              width: 334.w,
              decoration: BoxDecoration(
                color: Colors.transparent,
                borderRadius:  BorderRadius.circular(24.w),
                image: const DecorationImage(
                    image: AssetImage('${ValAssetsName.ASSETS_Message}val_notice_more_ground.png'),
                    fit: BoxFit.fill),
              ),
              child: Stack(
                children: [
                  Positioned(
                    top: 5, right: 5,
                    child: GestureDetector(
                        onTap: () => ValUIKitDialogImpl.closeDialog(),
                        child: Image.asset('${ValAssetsName.ASSETS_HOME}val_home_delete_close.png', width: 30, height: 30)
                    ),
                  ),

                  Positioned(
                    bottom: 46, left: 10, right: 10,
                    child: Container(
                      alignment: Alignment.center,
                      child: SizedBox(
                          height: 32.w,
                          child: _createConfirmButton()
                      ),
                    ),
                  ),
                ],
              ),
            ),
          ],
        )
    );
  }


  Widget _createConfirmButton() {
    return ValUIKitBtn(Padding(
      padding: EdgeInsets.only(left: 30.w,right: 30.w),
      child: Container(
        height: 32.w,
        width: 107.w,
        decoration: BoxDecoration(
          color: const Color(0xFF333333),
          borderRadius: BorderRadius.circular(10.w),
        ),
        child: Center(
          child: ValCommonText.oneLine('Sure', 20.w,
            ValUIKitBaseColors.white,
            fontWeight: FontWeight.w500,
            textAlign:  TextAlign.center,),
        ),
      ),
    ),(){
      ValUIKitDialogImpl.closeDialog();
      onSure();
    },);
  }
}
